import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.treeroot.planeservice.plane.entity.PcPlane;
import com.treeroot.planeservice.plane.mapper.PcPlaneMapper;
import com.treeroot.planeservice.plane.service.PcPlaneService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author:treeRoot
 * @Email:553503639@qq.com
 * @Date: Create in 14:20 / 2022/6/16
 */
public class fenye {

    @Autowired
    private PcPlaneMapper mapper;
    @Test
    public void list(){
        IPage<PcPlane> page =new Page<>(1,1);
        QueryWrapper<PcPlane> wrapper =new QueryWrapper<>();
        mapper.selectPage(page,wrapper);
        List<PcPlane> records = page.getRecords();
        long total = page.getTotal();
        Map map =new HashMap();
        map.put("total",total);
        map.put("rows",records);
        System.out.println(map);

    }

}
